package com.example.spotitube.Model;

import java.util.Comparator;

public class PopularityComparator implements Comparator<Track>{
	@Override
	public int compare(Track track1, Track track2){

		if (track1.getPopularity() < track2.getPopularity()){
			return 1;
		} else if (track1.getPopularity() > track2.getPopularity()){
			return -1;
		} else {
			return 0;
		}
	}
}